package com.sff.events {
	
	import flash.events.ErrorEvent;
	import flash.events.Event;
	
	import com.sff.core.ILoadable;	

	public class LoaderErrorEvent extends ErrorEvent {
		
		private var _item 			: ILoadable;
		
		public function LoaderErrorEvent (type : String, text : String = "", item : ILoadable = null) {
			super( type, false, false, text );
			
			_item = item;
		}
		
		public function get item () : ILoadable {
			if( _item )return _item;
			return target as ILoadable;	
		}

		override public function clone() : Event {
			return new LoaderErrorEvent( type, text, item );
		}
	}
}
